/******************************************************************************
 *	Written by:	Phil Monroe
 *	 	for:  	CS 456 - Homework 3A
 *		date:	April 11, 2011
 *	
 *	The image movement and capabilities were based off of the 
 *	"How to use Multi-touch in Android 2" blog post by Ed Burnette.
 *		http://zd.net/hvdckr
 *
/*****************************************************************************/
package org.cs456;

import org.cs456.data.Db;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity{
// Public Methods -------------------------------------------------------------
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		viewMain();
	}

	public void viewImage(View view){
		Intent myIntent = new Intent(view.getContext(), ImageActivity.class);
        startActivityForResult(myIntent, 0);
	}
	
	public void takePhoto(View view){
		Intent myIntent = new Intent(view.getContext(), TakePhotoActivity.class);
        startActivityForResult(myIntent, 0);
	}

	public void viewMain(){
		setContentView(R.layout.main);
		Button button = (Button) findViewById(R.id.button);
		Db db = new Db(this);
		button.setText(db.getString("oakid"));
	}
// Private Methods ------------------------------------------------------------


// Private Members ------------------------------------------------------------
	// Database Helper and database for text retrieval 
//	private Database db;
}